package com.ricky04.event;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * 注册事件监听  等价于myapplicationlistener
 */
@Component
public class EqualMyApplicationListener{
    @EventListener
    public void onApplicationEvent(MyApplicationEvent myApplicationEvent) {
        System.out.println("哎哟 等价 我监听到了呢");
    }
}
